
#ifndef RMath_h
#define RMath_h

#include <Defines.h>
#include <Typedef.h>

#include <System/MidpointRounding.h>
#include <System/Decimal.h>

namespace Riccsson
{
	namespace System
	{
		// Summary:
		//     Provides constants and static methods for trigonometric, logarithmic, and
		//     other common mathematical functions.
		class Math sealed
		{
		private: Math() {}

			// Summary:
			//     Represents the natural logarithmic base, specified by the constant, e.
			public: static const double E;

			//
			// Summary:
			//     Represents the ratio of the circumference of a circle to its diameter, specified
			//     by the constant, p.
			public: static const double PI;

			// Summary:
			//     Returns the absolute value of a System.Decimal number.
			//
			// Parameters:
			//   value:
			//     A number in the range System.Decimal.MinValue= value =System.Decimal.MaxValue.
			//
			// Returns:
			//     A System.Decimal, x, such that 0 = x =System.Decimal.MaxValue.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static decimal Abs(decimal value);

			//
			// Summary:
			//     Returns the absolute value of a double-precision floating-point number.
			//
			// Parameters:
			//   value:
			//     A number in the range System.Double.MinValue=value=System.Double.MaxValue.
			//
			// Returns:
			//     A double-precision floating-point number, x, such that 0 = x =System.Double.MaxValue.
			//[SecuritySafeCritical]
			public: static double Abs(double value);

			//
			// Summary:
			//     Returns the absolute value of a single-precision floating-point number.
			//
			// Parameters:
			//   value:
			//     A number in the range System.Single.MinValue=value=System.Single.MaxValue.
			//
			// Returns:
			//     A single-precision floating-point number, x, such that 0 = x =System.Single.MaxValue.
			//[SecuritySafeCritical]
			public: static float Abs(float value);

			//
			// Summary:
			//     Returns the absolute value of a 32-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A number in the range System.Int32.MinValue < value=System.Int32.MaxValue.
			//
			// Returns:
			//     A 32-bit signed integer, x, such that 0 = x =System.Int32.MaxValue.
			//
			// Exceptions:
			//   System.OverflowException:
			//     value equals System.Int32.MinValue.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Abs(int value);

			//
			// Summary:
			//     Returns the absolute value of a 64-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A number in the range System.Int64.MinValue < value=System.Int64.MaxValue.
			//
			// Returns:
			//     A 64-bit signed integer, x, such that 0 = x =System.Int64.MaxValue.
			//
			// Exceptions:
			//   System.OverflowException:
			//     value equals System.Int64.MinValue.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static long Abs(long value);

			public: static long long Abs(long long value);

			//
			// Summary:
			//     Returns the absolute value of an 8-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A number in the range System.SByte.MinValue < value=System.SByte.MaxValue.
			//
			// Returns:
			//     An 8-bit signed integer, x, such that 0 = x =System.SByte.MaxValue.
			//
			// Exceptions:
			//   System.OverflowException:
			//     value equals System.SByte.MinValue.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[CLSCompliant(false)]
			public: static sbyte Abs(sbyte value);

			//
			// Summary:
			//     Returns the absolute value of a 16-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A number in the range System.Int16.MinValue < value=System.Int16.MaxValue.
			//
			// Returns:
			//     A 16-bit signed integer, x, such that 0 = x =System.Int16.MaxValue.
			//
			// Exceptions:
			//   System.OverflowException:
			//     value equals System.Int16.MinValue.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static short Abs(short value);

			//
			// Summary:
			//     Returns the angle whose cosine is the specified number.
			//
			// Parameters:
			//   d:
			//     A number representing a cosine, where -1 =d= 1.
			//
			// Returns:
			//     An angle, ?, measured in radians, such that 0 =?=p-or- System.Double.NaN
			//     if d < -1 or d > 1.
			//[SecuritySafeCritical]
			public: static double Acos(double d);

			//
			// Summary:
			//     Returns the angle whose sine is the specified number.
			//
			// Parameters:
			//   d:
			//     A number representing a sine, where -1 =d= 1.
			//
			// Returns:
			//     An angle, ?, measured in radians, such that -p/2 =?=p/2 -or- System.Double.NaN
			//     if d < -1 or d > 1.
			//[SecuritySafeCritical]
			public: static double Asin(double d);

			//
			// Summary:
			//     Returns the angle whose tangent is the specified number.
			//
			// Parameters:
			//   d:
			//     A number representing a tangent.
			//
			// Returns:
			//     An angle, ?, measured in radians, such that -p/2 =?=p/2.-or- System.Double.NaN
			//     if d equals System.Double.NaN, -p/2 rounded to double precision (-1.5707963267949)
			//     if d equals System.Double.NegativeInfinity, or p/2 rounded to double precision
			//     (1.5707963267949) if d equals System.Double.PositiveInfinity.
			//[SecuritySafeCritical]
			public: static double Atan(double d);

			//
			// Summary:
			//     Returns the angle whose tangent is the quotient of two specified numbers.
			//
			// Parameters:
			//   y:
			//     The y coordinate of a point.
			//
			//   x:
			//     The x coordinate of a point.
			//
			// Returns:
			//     An angle, ?, measured in radians, such that -p=?=p, and tan(?) = y / x, where
			//     (x, y) is a point in the Cartesian plane. Observe the following: For (x,
			//     y) in quadrant 1, 0 < ? < p/2.For (x, y) in quadrant 2, p/2 < ?=p.For (x,
			//     y) in quadrant 3, -p < ? < -p/2.For (x, y) in quadrant 4, -p/2 < ? < 0.For
			//     points on the boundaries of the quadrants, the return value is the following:If
			//     y is 0 and x is not negative, ? = 0.If y is 0 and x is negative, ? = p.If
			//     y is positive and x is 0, ? = p/2.If y is negative and x is 0, ? = -p/2.
			//[SecuritySafeCritical]
			public: static double Atan2(double y, double x);

			//
			// Summary:
			//     Produces the full product of two 32-bit numbers.
			//
			// Parameters:
			//   a:
			//     The first System.Int32 to multiply.
			//
			//   b:
			//     The second System.Int32 to multiply.
			//
			// Returns:
			//     The System.Int64 containing the product of the specified numbers.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static long BigMul(int a, int b);

			//
			// Summary:
			//     Returns the smallest integral value that is greater than or equal to the
			//     specified decimal number.
			//
			// Parameters:
			//   d:
			//     A decimal number.
			//
			// Returns:
			//     The smallest integral value that is greater than or equal to d. Note that
			//     this method returns a System.Decimal instead of an integral type.
			public: static decimal Ceiling(decimal d);

			//
			// Summary:
			//     Returns the smallest integral value that is greater than or equal to the
			//     specified double-precision floating-point number.
			//
			// Parameters:
			//   a:
			//     A double-precision floating-point number.
			//
			// Returns:
			//     The smallest integral value that is greater than or equal to a. If a is equal
			//     to System.Double.NaN, System.Double.NegativeInfinity, or System.Double.PositiveInfinity,
			//     that value is returned. Note that this method returns a System.Double instead
			//     of an integral type.
			//[SecuritySafeCritical]
			public: static double Ceiling(double a);

			//
			// Summary:
			//     Returns the cosine of the specified angle.
			//
			// Parameters:
			//   d:
			//     An angle, measured in radians.
			//
			// Returns:
			//     The cosine of d. If d is equal to System.Double.NaN, System.Double.NegativeInfinity,
			//     or System.Double.PositiveInfinity, this method returns System.Double.NaN.
			//[SecuritySafeCritical]
			public: static double Cos(double d);

			//
			// Summary:
			//     Returns the hyperbolic cosine of the specified angle.
			//
			// Parameters:
			//   value:
			//     An angle, measured in radians.
			//
			// Returns:
			//     The hyperbolic cosine of value. If value is equal to System.Double.NegativeInfinity
			//     or System.Double.PositiveInfinity, System.Double.PositiveInfinity is returned.
			//     If value is equal to System.Double.NaN, System.Double.NaN is returned.
			//[SecuritySafeCritical]
			public: static double Cosh(double value);

			//
			// Summary:
			//     Calculates the quotient of two 32-bit signed integers and also returns the
			//     remainder in an output parameter.
			//
			// Parameters:
			//   a:
			//     The dividend.
			//
			//   b:
			//     The divisor.
			//
			//   result:
			//     The remainder.
			//
			// Returns:
			//     The quotient of the specified numbers.
			//
			// Exceptions:
			//   System.DivideByZeroException:
			//     b is zero.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int DivRem(int a, int b, int out result);

			//
			// Summary:
			//     Calculates the quotient of two 64-bit signed integers and also returns the
			//     remainder in an output parameter.
			//
			// Parameters:
			//   a:
			//     The dividend.
			//
			//   b:
			//     The divisor.
			//
			//   result:
			//     The remainder.
			//
			// Returns:
			//     The quotient of the specified numbers.
			//
			// Exceptions:
			//   System.DivideByZeroException:
			//     b is zero.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static long DivRem(long a, long b, long out result);

			//
			// Summary:
			//     Returns e raised to the specified power.
			//
			// Parameters:
			//   d:
			//     A number specifying a power.
			//
			// Returns:
			//     The number e raised to the power d. If d equals System.Double.NaN or System.Double.PositiveInfinity,
			//     that value is returned. If d equals System.Double.NegativeInfinity, 0 is
			//     returned.
			//[SecuritySafeCritical]
			public: static double Exp(double d);

			//
			// Summary:
			//     Returns the largest integer less than or equal to the specified decimal number.
			//
			// Parameters:
			//   d:
			//     A decimal number.
			//
			// Returns:
			//     The largest integer less than or equal to d.
			public: static decimal Floor(decimal d);

			//
			// Summary:
			//     Returns the largest integer less than or equal to the specified double-precision
			//     floating-point number.
			//
			// Parameters:
			//   d:
			//     A double-precision floating-point number.
			//
			// Returns:
			//     The largest integer less than or equal to d. If d is equal to System.Double.NaN,
			//     System.Double.NegativeInfinity, or System.Double.PositiveInfinity, that value
			//     is returned.
			//[SecuritySafeCritical]
			public: static double Floor(double d);

			//
			// Summary:
			//     Returns the remainder resulting from the division of a specified number by
			//     another specified number.
			//
			// Parameters:
			//   x:
			//     A dividend.
			//
			//   y:
			//     A divisor.
			//
			// Returns:
			//     A number equal to x - (y Q), where Q is the quotient of x / y rounded to
			//     the nearest integer (if x / y falls halfway between two integers, the even
			//     integer is returned).If x - (y Q) is zero, the value +0 is returned if x
			//     is positive, or -0 if x is negative.If y = 0, System.Double.NaN is returned.
			//[SecuritySafeCritical]
			public: static double IEEERemainder(double x, double y);

			//
			// Summary:
			//     Returns the natural (base e) logarithm of a specified number.
			//
			// Parameters:
			//   d:
			//     A number whose logarithm is to be found.
			//
			// Returns:
			//     One of the values in the following table. d parameterReturn value Positive
			//     The natural logarithm of d; that is, ln d, or log edZero System.Double.NegativeInfinityNegative
			//     System.Double.NaNEqual to System.Double.NaNSystem.Double.NaNEqual to System.Double.PositiveInfinitySystem.Double.PositiveInfinity
			//[SecuritySafeCritical]
			public: static double Log(double d);

			//
			// Summary:
			//     Returns the logarithm of a specified number in a specified base.
			//
			// Parameters:
			//   a:
			//     A number whose logarithm is to be found.
			//
			//   newBase:
			//     The base of the logarithm.
			//
			// Returns:
			//     One of the values in the following table. (+Infinity denotes System.Double.PositiveInfinity,
			//     -Infinity denotes System.Double.NegativeInfinity, and NaN denotes System.Double.NaN.)anewBaseReturn
			//     valuea> 0(0 <newBase< 1) -or-(newBase> 1)lognewBase(a)a< 0(any value)NaN(any
			//     value)newBase< 0NaNa != 1newBase = 0NaNa != 1newBase = +InfinityNaNa = NaN(any
			//     value)NaN(any value)newBase = NaNNaN(any value)newBase = 1NaNa = 00 <newBase<
			//     1 +Infinitya = 0newBase> 1-Infinitya = +Infinity0 <newBase< 1-Infinitya =
			//     +InfinitynewBase> 1+Infinitya = 1newBase = 00a = 1newBase = +Infinity0
			public: static double Log(double a, double newBase);

			//
			// Summary:
			//     Returns the base 10 logarithm of a specified number.
			//
			// Parameters:
			//   d:
			//     A number whose logarithm is to be found.
			//
			// Returns:
			//     One of the values in the following table. d parameter Return value Positive
			//     The base 10 log of d; that is, log 10d. Zero System.Double.NegativeInfinityNegative
			//     System.Double.NaNEqual to System.Double.NaNSystem.Double.NaNEqual to System.Double.PositiveInfinitySystem.Double.PositiveInfinity
			//[SecuritySafeCritical]
			public: static double Log10(double d);

			//
			// Summary:
			//     Returns the larger of two 8-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 8-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 8-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static byte Max(byte val1, byte val2);

			//
			// Summary:
			//     Returns the larger of two decimal numbers.
			//
			// Parameters:
			//   val1:
			//     The first of two System.Decimal numbers to compare.
			//
			//   val2:
			//     The second of two System.Decimal numbers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static decimal Max(decimal val1, decimal val2);

			//
			// Summary:
			//     Returns the larger of two double-precision floating-point numbers.
			//
			// Parameters:
			//   val1:
			//     The first of two double-precision floating-point numbers to compare.
			//
			//   val2:
			//     The second of two double-precision floating-point numbers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger. If val1, val2, or both val1
			//     and val2 are equal to System.Double.NaN, System.Double.NaN is returned.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static double Max(double val1, double val2);

			//
			// Summary:
			//     Returns the larger of two single-precision floating-point numbers.
			//
			// Parameters:
			//   val1:
			//     The first of two single-precision floating-point numbers to compare.
			//
			//   val2:
			//     The second of two single-precision floating-point numbers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger. If val1, or val2, or both val1
			//     and val2 are equal to System.Single.NaN, System.Single.NaN is returned.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static float Max(float val1, float val2);

			//
			// Summary:
			//     Returns the larger of two 32-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 32-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 32-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static int Max(int val1, int val2);

			//
			// Summary:
			//     Returns the larger of two 64-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 64-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 64-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static long Max(long val1, long val2);

			//
			// Summary:
			//     Returns the larger of two 8-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 8-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 8-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[CLSCompliant(false)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static sbyte Max(sbyte val1, sbyte val2);

			//
			// Summary:
			//     Returns the larger of two 16-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 16-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 16-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static short Max(short val1, short val2);

			//
			// Summary:
			//     Returns the larger of two 32-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 32-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 32-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[CLSCompliant(false)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static uint Max(uint val1, uint val2);

			//
			// Summary:
			//     Returns the larger of two 64-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 64-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 64-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static ulong Max(ulong val1, ulong val2);

			//
			// Summary:
			//     Returns the larger of two 16-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 16-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 16-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is larger.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static ushort Max(ushort val1, ushort val2);

			//
			// Summary:
			//     Returns the smaller of two 8-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 8-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 8-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static byte Min(byte val1, byte val2);

			//
			// Summary:
			//     Returns the smaller of two decimal numbers.
			//
			// Parameters:
			//   val1:
			//     The first of two System.Decimal numbers to compare.
			//
			//   val2:
			//     The second of two System.Decimal numbers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static decimal Min(decimal val1, decimal val2);

			//
			// Summary:
			//     Returns the smaller of two double-precision floating-point numbers.
			//
			// Parameters:
			//   val1:
			//     The first of two double-precision floating-point numbers to compare.
			//
			//   val2:
			//     The second of two double-precision floating-point numbers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller. If val1, val2, or both val1
			//     and val2 are equal to System.Double.NaN, System.Double.NaN is returned.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static double Min(double val1, double val2);

			//
			// Summary:
			//     Returns the smaller of two single-precision floating-point numbers.
			//
			// Parameters:
			//   val1:
			//     The first of two single-precision floating-point numbers to compare.
			//
			//   val2:
			//     The second of two single-precision floating-point numbers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller. If val1, val2, or both val1
			//     and val2 are equal to System.Single.NaN, System.Single.NaN is returned.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static float Min(float val1, float val2);

			//
			// Summary:
			//     Returns the smaller of two 32-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 32-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 32-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static int Min(int val1, int val2);

			//
			// Summary:
			//     Returns the smaller of two 64-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 64-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 64-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static long Min(long val1, long val2);

			//
			// Summary:
			//     Returns the smaller of two 8-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 8-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 8-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static sbyte Min(sbyte val1, sbyte val2);

			//
			// Summary:
			//     Returns the smaller of two 16-bit signed integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 16-bit signed integers to compare.
			//
			//   val2:
			//     The second of two 16-bit signed integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static short Min(short val1, short val2);

			//
			// Summary:
			//     Returns the smaller of two 32-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 32-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 32-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static uint Min(uint val1, uint val2);

			//
			// Summary:
			//     Returns the smaller of two 64-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 64-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 64-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static ulong Min(ulong val1, ulong val2);

			//
			// Summary:
			//     Returns the smaller of two 16-bit unsigned integers.
			//
			// Parameters:
			//   val1:
			//     The first of two 16-bit unsigned integers to compare.
			//
			//   val2:
			//     The second of two 16-bit unsigned integers to compare.
			//
			// Returns:
			//     Parameter val1 or val2, whichever is smaller.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			public: static ushort Min(ushort val1, ushort val2);

			//
			// Summary:
			//     Returns a specified number raised to the specified power.
			//
			// Parameters:
			//   x:
			//     A double-precision floating-point number to be raised to a power.
			//
			//   y:
			//     A double-precision floating-point number that specifies a power.
			//
			// Returns:
			//     The number x raised to the power y.
			//[SecuritySafeCritical]
			public: static double Pow(double x, double y);

			//
			// Summary:
			//     Rounds a decimal value to the nearest integral value.
			//
			// Parameters:
			//   d:
			//     A decimal number to be rounded.
			//
			// Returns:
			//     The integer nearest parameter d. If the fractional component of d is halfway
			//     between two integers, one of which is even and the other odd, the even number
			//     is returned. Note that this method returns a System.Decimal instead of an
			//     integral type.
			//
			// Exceptions:
			//   System.OverflowException:
			//     The result is outside the range of a System.Decimal.
			public: static decimal Round(decimal d);

			//
			// Summary:
			//     Rounds a double-precision floating-point value to the nearest integral value.
			//
			// Parameters:
			//   a:
			//     A double-precision floating-point number to be rounded.
			//
			// Returns:
			//     The integer nearest a. If the fractional component of a is halfway between
			//     two integers, one of which is even and the other odd, then the even number
			//     is returned. Note that this method returns a System.Double instead of an
			//     integral type.
			//[SecuritySafeCritical]
			public: static double Round(double a);

			//
			// Summary:
			//     Rounds a decimal value to a specified number of fractional digits.
			//
			// Parameters:
			//   d:
			//     A decimal number to be rounded.
			//
			//   decimals:
			//     The number of decimal places in the return value.
			//
			// Returns:
			//     The number nearest to d that contains a number of fractional digits equal
			//     to decimals.
			//
			// Exceptions:
			//   System.ArgumentOutOfRangeException:
			//     decimals is less than 0 or greater than 28.
			//
			//   System.OverflowException:
			//     The result is outside the range of a System.Decimal.
			public: static decimal Round(decimal d, int decimals);

			//
			// Summary:
			//     Rounds a decimal value to the nearest integer. A parameter specifies how
			//     to round the value if it is midway between two other numbers.
			//
			// Parameters:
			//   d:
			//     A decimal number to be rounded.
			//
			//   mode:
			//     Specification for how to round d if it is midway between two other numbers.
			//
			// Returns:
			//     The integer nearest d. If d is halfway between two numbers, one of which
			//     is even and the other odd, then mode determines which of the two is returned.
			//
			// Exceptions:
			//   System.ArgumentException:
			//     mode is not a valid value of System.MidpointRounding.
			//
			//   System.OverflowException:
			//     The result is outside the range of a System.Decimal.
			//[SecuritySafeCritical]
			public: static decimal Round(decimal d, MidpointRounding mode);

			//
			// Summary:
			//     Rounds a double-precision floating-point value to a specified number of fractional
			//     digits.
			//
			// Parameters:
			//   value:
			//     A double-precision floating-point number to be rounded.
			//
			//   digits:
			//     The number of fractional digits in the return value.
			//
			// Returns:
			//     The number nearest to value that contains a number of fractional digits equal
			//     to digits.
			//
			// Exceptions:
			//   System.ArgumentOutOfRangeException:
			//     digits is less than 0 or greater than 15.
			public: static double Round(double value, int digits);

			//
			// Summary:
			//     Rounds a double-precision floating-point value to the nearest integer. A
			//     parameter specifies how to round the value if it is midway between two other
			//     numbers.
			//
			// Parameters:
			//   value:
			//     A double-precision floating-point number to be rounded.
			//
			//   mode:
			//     Specification for how to round value if it is midway between two other numbers.
			//
			// Returns:
			//     The integer nearest value. If value is halfway between two integers, one
			//     of which is even and the other odd, then mode determines which of the two
			//     is returned.
			//
			// Exceptions:
			//   System.ArgumentException:
			//     mode is not a valid value of System.MidpointRounding.
			public: static double Round(double value, MidpointRounding mode);

			//
			// Summary:
			//     Rounds a decimal value to a specified number of fractional digits. A parameter
			//     specifies how to round the value if it is midway between two other numbers.
			//
			// Parameters:
			//   d:
			//     A decimal number to be rounded.
			//
			//   decimals:
			//     The number of decimal places in the return value.
			//
			//   mode:
			//     Specification for how to round d if it is midway between two other numbers.
			//
			// Returns:
			//     The number nearest to d that contains a number of fractional digits equal
			//     to decimals. If the number of fractional digits in d is less than decimals,
			//     d is returned unchanged.
			//
			// Exceptions:
			//   System.ArgumentOutOfRangeException:
			//     decimals is less than 0 or greater than 28.
			//
			//   System.ArgumentException:
			//     mode is not a valid value of System.MidpointRounding.
			//
			//   System.OverflowException:
			//     The result is outside the range of a System.Decimal.
			//[SecuritySafeCritical]
			public: static decimal Round(decimal d, int decimals, MidpointRounding mode);

			//
			// Summary:
			//     Rounds a double-precision floating-point value to the specified number of
			//     fractional digits. A parameter specifies how to round the value if it is
			//     midway between two other numbers.
			//
			// Parameters:
			//   value:
			//     A double-precision floating-point number to be rounded.
			//
			//   digits:
			//     The number of fractional digits in the return value.
			//
			//   mode:
			//     Specification for how to round value if it is midway between two other numbers.
			//
			// Returns:
			//     The number nearest to value that has a number of fractional digits equal
			//     to digits. If the number of fractional digits in value is less than digits,
			//     value is returned unchanged.
			//
			// Exceptions:
			//   System.ArgumentOutOfRangeException:
			//     digits is less than 0 or greater than 15.
			//
			//   System.ArgumentException:
			//     mode is not a valid value of System.MidpointRounding.
			public: static double Round(double value, int digits, MidpointRounding mode);

			//
			// Summary:
			//     Returns a value indicating the sign of a decimal number.
			//
			// Parameters:
			//   value:
			//     A signed System.Decimal number.
			//
			// Returns:
			//     A number that indicates the sign of value, as shown in the following table.Return
			//     value Meaning -1 value is less than zero. 0 value is equal to zero. 1 value
			//     is greater than zero.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Sign(decimal value);

			//
			// Summary:
			//     Returns a value indicating the sign of a double-precision floating-point
			//     number.
			//
			// Parameters:
			//   value:
			//     A signed number.
			//
			// Returns:
			//     A number that indicates the sign of value, as shown in the following table.Return
			//     value Meaning -1 value is less than zero. 0 value is equal to zero. 1 value
			//     is greater than zero.
			//
			// Exceptions:
			//   System.ArithmeticException:
			//     value is equal to System.Double.NaN.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Sign(double value);

			//
			// Summary:
			//     Returns a value indicating the sign of a single-precision floating-point
			//     number.
			//
			// Parameters:
			//   value:
			//     A signed number.
			//
			// Returns:
			//     A number that indicates the sign of value, as shown in the following table.Return
			//     value Meaning -1 value is less than zero. 0 value is equal to zero. 1 value
			//     is greater than zero.
			//
			// Exceptions:
			//   System.ArithmeticException:
			//     value is equal to System.Single.NaN.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Sign(float value);

			//
			// Summary:
			//     Returns a value indicating the sign of a 32-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A signed number.
			//
			// Returns:
			//     A number that indicates the sign of value, as shown in the following table.Return
			//     value Meaning -1 value is less than zero. 0 value is equal to zero. 1 value
			//     is greater than zero.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Sign(int value);

			//
			// Summary:
			//     Returns a value indicating the sign of a 64-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A signed number.
			//
			// Returns:
			//     A number that indicates the sign of value, as shown in the following table.Return
			//     value Meaning -1 value is less than zero. 0 value is equal to zero. 1 value
			//     is greater than zero.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Sign(long value);

			//
			// Summary:
			//     Returns a value indicating the sign of an 8-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A signed number.
			//
			// Returns:
			//     A number that indicates the sign of value, as shown in the following table.Return
			//     value Meaning -1 value is less than zero. 0 value is equal to zero. 1 value
			//     is greater than zero.
			//[CLSCompliant(false)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Sign(sbyte value);

			//
			// Summary:
			//     Returns a value indicating the sign of a 16-bit signed integer.
			//
			// Parameters:
			//   value:
			//     A signed number.
			//
			// Returns:
			//     A number that indicates the sign of value, as shown in the following table.Return
			//     value Meaning -1 value is less than zero. 0 value is equal to zero. 1 value
			//     is greater than zero.
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static int Sign(short value);

			//
			// Summary:
			//     Returns the sine of the specified angle.
			//
			// Parameters:
			//   a:
			//     An angle, measured in radians.
			//
			// Returns:
			//     The sine of a. If a is equal to System.Double.NaN, System.Double.NegativeInfinity,
			//     or System.Double.PositiveInfinity, this method returns System.Double.NaN.
			//[SecuritySafeCritical]
			public: static double Sin(double a);

			//
			// Summary:
			//     Returns the hyperbolic sine of the specified angle.
			//
			// Parameters:
			//   value:
			//     An angle, measured in radians.
			//
			// Returns:
			//     The hyperbolic sine of value. If value is equal to System.Double.NegativeInfinity,
			//     System.Double.PositiveInfinity, or System.Double.NaN, this method returns
			//     a System.Double equal to value.
			//[SecuritySafeCritical]
			public: static double Sinh(double value);

			//
			// Summary:
			//     Returns the square root of a specified number.
			//
			// Parameters:
			//   d:
			//     A number.
			//
			// Returns:
			//     One of the values in the following table. d parameter Return value Zero,
			//     or positive The positive square root of d. Negative System.Double.NaNEquals
			//     System.Double.NaNSystem.Double.NaNEquals System.Double.PositiveInfinitySystem.Double.PositiveInfinity
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[SecuritySafeCritical]
			public: static double Sqrt(double d);

			//
			// Summary:
			//     Returns the tangent of the specified angle.
			//
			// Parameters:
			//   a:
			//     An angle, measured in radians.
			//
			// Returns:
			//     The tangent of a. If a is equal to System.Double.NaN, System.Double.NegativeInfinity,
			//     or System.Double.PositiveInfinity, this method returns System.Double.NaN.
			//[SecuritySafeCritical]
			public: static double Tan(double a);

			//
			// Summary:
			//     Returns the hyperbolic tangent of the specified angle.
			//
			// Parameters:
			//   value:
			//     An angle, measured in radians.
			//
			// Returns:
			//     The hyperbolic tangent of value. If value is equal to System.Double.NegativeInfinity,
			//     this method returns -1. If value is equal to System.Double.PositiveInfinity,
			//     this method returns 1. If value is equal to System.Double.NaN, this method
			//     returns System.Double.NaN.
			//[SecuritySafeCritical]
			public: static double Tanh(double value);

			//
			// Summary:
			//     Calculates the integral part of a specified decimal number.
			//
			// Parameters:
			//   d:
			//     A number to truncate.
			//
			// Returns:
			//     The integral part of d; that is, the number that remains after any fractional
			//     digits have been discarded.
			public: static decimal Truncate(decimal d);

			//
			// Summary:
			//     Calculates the integral part of a specified double-precision floating-point
			//     number.
			//
			// Parameters:
			//   d:
			//     A number to truncate.
			//
			// Returns:
			//     The integral part of d; that is, the number that remains after any fractional
			//     digits have been discarded.
			public: static double Truncate(double d);
		};
	}
}

#endif
